Environment Setup

From Documentation


Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


ZK

For client-side debugging, developers must generate a predictable component id allowing client-side unit testing libraries access to the UI components. Simply define the following configuration in your zk.xml, ZK will generate UUIDs (Universal Unique Identifiers) by using the component id rather than a randomly generated UUID.

<desktop-config>
	<id-to-uuid-prefix>z_</id-to-uuid-prefix>
</desktop-config>

Then, the following component's UUID will be z_foo.

<textbox id="foo"/>

Selenium

  1. unzip selenium-remote-control-1.xx-dist.zip to your drive, and the location is SELENIUM_HOME.
  2. Go to the SELENIUM_HOME/selenium-server-1.0/ directory and launch
java -jar selenium-server.jar

Firefox

The Selenium Remote Control act as a proxy, so, to have all the test run,you have to set up the browser proxy configuration. Create a proxy.pac as the one reported below. Go to Preferences > Advanced > Network > Settings and set automatic proxy configuration url to file:///path/to/your/proxy.pac

For windows users:In Internet Explorer you must specify the pac file with a slash less: file://path/to/your/proxy.pac

proxy.pac

function FindProxyForURL(url, host) {
  if ( shExpMatch(url,"*selenium-server*") ) {
    return "PROXY localhost:4444; DIRECT"; //The Selenium Remote Control
  } else {
    if ( shExpMatch(host,"localhost") ) {
      return "DIRECT";
    } else {
      return "PROXY your.proxy.com:proxyport; DIRECT"; // or DIRECT like localhost if you have no proxy
    }
  }
}

Check that everything is working smoothly visiting for example, http://google.com, and http://google.com/selenium-server. If everything is ok you must see the following error message for the second link.

HTTP ERROR: 404

/selenium-server/ Not Found

RequestURI=/selenium-server/

Powered by Jetty://

You have also to go in about:config and set to false the browser.sessionstore.resume_from_crash property.



Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.